package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

// 使用mybatisplus  继承基础mapper 指定实体类
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 根据用户名查询员工
     *
     * @param username
     * @return
     */
    Employee getByUsername(String username);

    /**
     * 分页查询
     *
     * @param name 员工姓名
     * @return
     */
    List<Employee> list(@Param("name") String name);

    /*   *//**
     * 新增用户
     * @param employee
     *//*
    void insert(Employee employee); */

}
